import { Map } from 'immutable'
import * as actionTypes from './constance'

const stateDefault = Map({
    subcountInfo:[],
    artistSublistInfo:[],
    mvSublistInfo:[],
    playlists:[]
    // login:[]
})

const reducerAction = (state=stateDefault,action) => {
    switch(action.type){
        case actionTypes.SUBCOUNT:
            return state.set('subcountInfo',action.subCounts)
        case actionTypes.ARTISTSUBLISTINFO:
            return state.set('artistSublistInfo',action.artistSublists)
        case actionTypes.MVSUBLIST:
            return state.set('mvSublistInfo',action.mvSublists)
        case actionTypes.GETPLAYLISTCONTENT:
            return state.set('playlists',action.playlists)
        // case actionTypes.LOGINSTATUS:
        //     return state.set('login',action.isLogin)
        default :
            return state
    }
}

export default reducerAction

